Jx.declare('Jx.system.Controller', {

	$extend: 'Jx.Base',

	application: null,

	applicationBaseClass: 'Jx.system.Application',

	constructor: function(application, config){

		if (application && Jx.instanceOf(application, this.applicationBaseClass)){

			this.application = application;

			this.$super([ config ]);

		} else {

			throw new Error('Created controller that doesn\'t belong to any Application');

		}

	}

});
